<#include "../../template/page.ftl">
<@compress >
    <#assign title="管理后台"/>
    <@head title=title>
    <script type="text/javascript">
        // 登录页面若在框架内，则跳出框架
        if (self != top) {
            top.location = self.location;
        }
    </script>
    </@head>
<body class="login">
<div id="login">
    <h1>
        <a href="" title="基于 WordPress" target="_blank">${title}</a>
    </h1>
    <form id="loginForm" name="loginForm" action="${path}/blog/login/doLogin" method="post">
        <p>
            <label for="loginName">用户名<br>
                <input type="text" name="loginName" id="loginName" class="easyui-validatebox input" style="width: 250px;"
                       data-options="required:true,validType:'length[3,20]'"
                       tabindex="10">
            </label> <span style="color: red;"><@errors path="loginForm.loginName" /></span>
        </p>
        <p>
            <label for="password">密码<br>
                <input type="password" name="password" id="password" class="easyui-validatebox input"
                       data-options="required:true,validType:'length[3,20]'" value="" style="width: 250px;"
                       tabindex="20">
            </label> <span style="color: red;"><@errors path="loginForm.password" /></span>
        </p>

        <p class="forgetmenot">
            <label for="rememberme"><input name="rememberme"
                                           type="checkbox" id="rememberme" value="forever" tabindex="90">
                记住我的登录信息</label>
        </p>

        <p class="submit" align="right">
            <a href="javascript:void(0);" class="easyui-linkbutton" id="submit" tabindex="100">登录</a>
            <script type="text/javascript">
                $(document).ready(function () {
                    $('#submit').click(function () {
                        if (!$('#loginForm').form('validate')) {
                            return false;
                        }
                        document.forms[0].submit();
                        return false;
                    });
                });
            </script>
            <input
                    type="hidden" name="redirect_to"
                    value="http://localhost/wordpress/wp-admin/">
            <input
                    type="hidden" name="easyui" value="1">
        </p>
    </form>

    <p id="nav">
        <a href="http://localhost/wordpress/wp-login.php?action=lostpassword"
           title="找回密码">忘记密码？</a>&nbsp;&nbsp;<a href="${path}/" title="不知道自己在哪？">←
        回到博客首页</a>
    </p>
</div>
<div class="clear"></div>
</body>
</html>
</@compress>